<template>
  <div id="note-nav-bar" :class="{'is-fixed': isFixed}">
    <div class="nav-bar-container">
      <div class="nav-bar-left">
        <slot name="left"></slot>
      </div>
      <div class="nav-bar-center">
        <slot name="center"></slot>
      </div>
      <div class="nav-bar-right">
        <slot name="right"></slot>
      </div>
    </div>
  </div>
</template>

<script>
import {} from "vue";
export default {
  props: ['isFixed'],
  setup(props) {
    const {isFixed} = props
    return isFixed
  },
};
</script>

<style scoped lang='less'>
#note-nav-bar {
  width: 100%;
  height: 60px;
  border-bottom: 1px solid #f1f1f1;
  display: flex;
  .nav-bar-container {
    width: 100%;
    margin: 0 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    .nav-bar-left,
    .nav-bar-center,
    .nav-bar-right {
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .nav-bar-left {
      width: 20%;
      height: 100%;
    }
    .nav-bar-center {
      width: 100%;
      height: 100%;
    }
    .nav-bar-right {
      width: 20%;
      height: 100%;
    }
  }
}

.is-fixed {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  right: 0;
}
</style>